package com.ydy.common.vo;

import com.ydy.common.model.UserFriend;

import java.sql.Timestamp;

public class UserFriendVo extends UserFriend implements Comparable<UserFriendVo>{

    private String userName;
    private String friendName;
    private String friendPortrait;
    private String message;
    private Timestamp messageTime;
    private String showTime;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getFriendName() {
        return friendName;
    }

    public void setFriendName(String friendName) {
        this.friendName = friendName;
    }

    public String getFriendPortrait() {
        return friendPortrait;
    }

    public void setFriendPortrait(String friendPortrait) {
        this.friendPortrait = friendPortrait;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Timestamp getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(Timestamp messageTime) {
        this.messageTime = messageTime;
    }

    public String getShowTime() {
        return showTime;
    }

    public void setShowTime(String showTime) {
        this.showTime = showTime;
    }

    @Override
    public String toString() {
        return "UserFriendVo{" +
                "userName='" + userName + '\'' +
                ", friendName='" + friendName + '\'' +
                ", friendPortrait='" + friendPortrait + '\'' +
                ", message='" + message + '\'' +
                ", messageTime='" + messageTime + '\'' +
                ", showTime='" + showTime + '\'' +
                '}';
    }

    @Override
    public int compareTo(UserFriendVo o) {
        return o.getMessageTime().compareTo(this.messageTime);
    }
}
